
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            display:flex;
        }
        div{
            border: 5px solid red;
            height: 200px;
            width: 150px;
        }
        .container1{
            background-image: url(./精灵图模板.jpg);
            background-position: 0px -200px;
        }
        .container2{
            background-image: url(./精灵图模板.jpg);
            background-position: -120px -362px;
        }
    </style>
</head>

<body>
    <div class="container1"></div>
    <div class="container2"></div>
</body>

</html